import request from '../../utils/request'

export function addSimulate(data) {
  return request({
    url: '/simulation/',
    method: 'post',
    data: data
  })
}

export function getSimulateList(data) {
  return request({
    url: '/simulation/list-page',
    method: 'post',
    data: data
  })
}

export function getSimulateDetailById(id) {
  return request({
    url: '/simulation/with-results/'+id,
    method: 'get'
  })
}

export function deleteSimulateById(id) {
  return request({
    url: '/simulation/' + id,
    method: 'delete'
  })
}

export function getSimulateCategory(id) {
  return request({
    url: '/simulation/with-results-detail/' + id,
    method: 'get'
  })
}

export function exportSimulate(id) {
  return request({
    url: '/simulation/simulation/export_simulation_by_id/' + id,
    method: 'get',
    responseType: 'blob'
  })
}

